package day05;
import java.util.Scanner;
public class Test2 {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        System.out.println("请输入您的数字：");
        int n= scan.nextInt();
        if(n%2!=0){
            for (int i=1;i<=n/2+1;i++){
                for (int j=1;j<=(n/2+1)-i;j++){
                    System.out.print(" ");
                }
                for (int j=1;j<=2*i-1;j++){
                    System.out.print("*");
                }
                System.out.println();
            }
            for(int i =1;i<=n/2;i++){
                for(int j=1;j<=i;j++){
                    System.out.print(" ");
                }
                for (int j=1;j<=n-2*i;j++){
                    System.out.print("*");
                }
                System.out.println();
            }
        } else {
            System.out.println("不足以生成菱形");
        }
    }
}
